#include <iostream>
#include <pointcloud_to_grid.hpp>

int main(int argc, char * argv[])
{
  std::cout << "Hello, World!" << std::endl;

  rclcpp::init(argc, argv);

  rclcpp::NodeOptions options;
  options.parameter_overrides( {
  {"input_topic", "/unilidar/cloud"},
    // {"output_frame", "/unilidar_lidar"},
    {"map_resolution", 0.1},
    {"min_height", -1.0},
    {"max_height", 1.0},
    // {"map_origin_x", 0.0},
    // {"map_origin_y", 0.0},
    {"update_period", 1.0}
  });

  auto node_ptr = std::make_shared<p2g::PointCloudToGridNode>(options);
  rclcpp::spin(node_ptr);
  rclcpp::shutdown();

  return 0;
}